package com.project.springboot.controller;

import com.gitee.yongzhuzl.commonutil.util.result.ResponseResult;
import com.project.springboot.entity.DrugConst;
import com.project.springboot.service.drug.DrugConstService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * description: 药品目录信息控制器
 * @author 朱正磊
 * @date 2024-10-24 17:21:32
 */
@RestController
@RequestMapping("/drug/const")
public class DrugConstController {

    @Resource
    private DrugConstService drugConstService;

    /**
     * description: 查询药品目录信息集合
     * @author 朱正磊
     * @date 2024-10-24 17:24:21
     * @return 返回药品目录信息集合
     */
    @GetMapping("/list")
    public ResponseResult<List<DrugConst>> list() {
        List<DrugConst> drugConstList = drugConstService.listDrugConst();
        return ResponseResult.buildSuccess(drugConstList);
    }

}
